# -*- coding: utf-8 -*-
import json
import decimal

def json_encode_custom(obj):
    if isinstance(obj, decimal.Decimal):
        return str(round(obj,4))